$OpenBSD: patch-libgphoto2_port_gphoto2_gphoto2-port-portability_h,v 1.6 2014/12/22 14:26:01 ajacoutot Exp $

libusb1/libusb1.c:304: warning: implicit declaration of function 'snprintf'
libusb1/libusb1.c:304: warning: incompatible implicit declaration of built-in function 'snprintf'

--- libgphoto2_port/gphoto2/gphoto2-port-portability.h.orig	Fri Jun 27 07:26:01 2014
+++ libgphoto2_port/gphoto2/gphoto2-port-portability.h	Sat Aug 30 11:23:15 2014
@@ -175,6 +175,7 @@ typedef struct {
 /* yummy. :) */
 
 /* XOPEN needed for usleep */
+#ifndef __OpenBSD__
 #ifndef _XOPEN_SOURCE
 # define _XOPEN_SOURCE 500
 #else
@@ -183,11 +184,14 @@ typedef struct {
 #  define _XOPEN_SOURCE 500
 # endif
 #endif
+#endif
 
 /* for nanosleep */
+#ifndef __OpenBSD__
 # ifndef _POSIX_C_SOURCE
 #  define _POSIX_C_SOURCE 199309
 # endif
+#endif
 # include <time.h>
 
 # include <strings.h>
